<?php
/*
 * Defines 
 */
/**
 * Define the path to this file
 */
define('APP_PATH', dirname(__FILE__)); 

/**
 * Define path to class files
 */
define('APP_CLASS', APP_PATH . '/classes');
 
/**
 * Define path to theme files
 */
define('APP_THEME', APP_PATH . '/themes');

/**
 * Define path to image files
 */
define('APP_IMAGE', APP_PATH . '/xpm');

/**
 * Define path to image files
 */
define('APP_PROJECT', APP_PATH . '/projects');

/**
 * Define path to plugin files
 */
define('APP_PLUGIN', APP_PATH . '/classes/plugins');

/**
 * Define path to user files
 *
 *@todo This must be get from enviroment, in a system dependent way,
 *      current is the same as APP_PATH, but must be /home/user/.phpgtkeditor
 *      on Linux and C:\Documents and Settings\User\App Data\PhpGtkEditor
 *      on Windows
 *
 */
define('APP_USER', APP_PATH);

// Test for gladexml
if (class_exists("GladeXML")) {
    define("APP_EXT_GLADE", true);
} else {
    define("APP_EXT_GLADE", false);
}
        
// Test for scintilla
if (class_exists("GtkScintilla")) {
    define("APP_EXT_SCINTILLA", true);
} else {
    define("APP_EXT_SCINTILLA", false);
}
        
// test for sourceview
if (class_exists("GtkSourceView")) {
    define("APP_EXT_SOURCEVIEW", true);
} else {
    define("APP_EXT_SOURCEVIEW", false);
}
        
//test for pspell
if (function_exists("pspell_config_create")) {
    define("APP_EXT_PSPELL", true);
} else {
    define("APP_EXT_PSPELL", false);
}

//Test for the SO
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'){
    define('APP_OS_WIN', true);
} else {
    define('APP_OS_WIN', false);
}    
?>